import 'package:flutter/material.dart';

import '../../common/const/app_color_const.dart';
import '../../common/enum/btn_enum.dart';
import '../../router_table.dart';
import '../../widget/icon_outlined_btn.dart';

class NotFoundPage extends StatefulWidget {
  const NotFoundPage({Key? key}) : super(key: key);

  @override
  State<NotFoundPage> createState() => NotFoundPageState();
}

class NotFoundPageState extends State<NotFoundPage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("404"),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Padding(
            padding: const EdgeInsets.all(50),
            child: Image.asset(
              'assets/images/not_found/not_page.png',
            ),
          ),
          const Text(
            "您访问的页面不存在，您可以进行以下操作：",
            style: TextStyle(color: blackColor66),
          ),
          Container(
              padding: const EdgeInsets.only(top: 10),
              width: 105,
              child: IconOutlinedBtn(
                  text: '返回到首页',
                  btnType: BtnType.primary,
                  onPressed: () {
                    Navigator.of(context).pushNamed(RouterTable.homePath);
                  })),
        ],
      ),
    );
  }
}
